{% extends 'index.html' %}
{% load student_tags %}
{% block pg-content %}
    <div class="panel panel-info">
        <div class="panel-heading">{{ enrollment_obj.enrolled_class }}</div>
        <div class="panel-body">
            <table class="table  ">
                <thead>
                    <tr>
                        <th>课程节次</th>
                        <th>上课日期</th>
                        <th>是否有作业</th>
                        <th>作业标题</th>
                        <th>签到状态</th>
                        <th>成绩</th>
                        <th>作业管理</th>
                    </tr>
                </thead>
                <tbody>
                {% for study_record in enrollment_obj.studyrecord_set.all %}
                        <tr>
                            <td>{{ study_record.course_record.day_num }}</td>
                            <td>s{{ study_record.course_record.date }}</td>
                            <td>{{ study_record.course_record.has_homework }}</td>
                            <td>{{ study_record.course_record.homework_title }}</td>
                            <td>{{ study_record.get_attendance_display }}</td>
                            <td>{{ study_record.get_score_display }}</td>
                            <td><a href="{% url 'homework_detail' study_record.id%}">作业详情</a></td>
                        </tr>

                    {% endfor %}
                </tbody>
            </table>
        </div>
    </div>


{% endblock %}